import 'package:json_annotation/json_annotation.dart';

part 'staff_tip_page_data.g.dart';

@JsonSerializable()
class StaffTipPageData extends Object {
  int total;

  int totalPage;

  List<StaffTip> items;

  StaffTipPageData(
    this.total,
    this.totalPage,
    this.items,
  );

  factory StaffTipPageData.fromJson(Map<String, dynamic> srcJson) => _$StaffTipPageDataFromJson(srcJson);

  Map<String, dynamic> toJson() => _$StaffTipPageDataToJson(this);
}

@JsonSerializable()
class StaffTip extends Object {
  String latestComment;

  int totalTip;

  int userId;

  String waiterName;

  StaffTip(
    this.latestComment,
    this.totalTip,
    this.userId,
    this.waiterName,
  );

  factory StaffTip.fromJson(Map<String, dynamic> srcJson) => _$StaffTipFromJson(srcJson);

  Map<String, dynamic> toJson() => _$StaffTipToJson(this);
}
